#define _CRT_SECURE_NO_WARNINGS 1
#include<bits/stdc++.h>
using namespace std;
#define ll long long
const int N = 1e5 + 10;
ll a[N], n, k;

ll check(ll mid) {
    ll res = 0;
    for (int i = 1; i <= n; i++) {
        res += a[i] / mid;
    }
    return res;
}

int main() {
    ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    cin >> n >> k;
    for (int i = 1; i <= n; i++) cin >> a[i];
    sort(a + 1, a + n + 1);
    ll l = 0, r = 1e9 + 10;
    ll ans = -1;
    while (l + 1 != r) {
        ll mid = (l + r) / 2;
        if (check(mid) >= k) {
            l = mid;
            ans = mid;
        }
        else r = mid;
    }
    cout << ans << '\n';
    return 0;
}